import React, { Component } from 'react';
import {
    View,
    Text,
    Alert,
    Image,
    StyleSheet,
    TouchableOpacity,
} from 'react-native';
import pxToDp from '../config/pxToDp'
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
export default class myGroupChatScene extends Component {

    constructor(props) {
        super(props);
        this.state = {
            status : 1,
        }

    }


    render() {
        //解构
        
        return (
            <View style={{ flex: 1 }}>
                {this.state.status == 0 ? (
                    <View style={styles.center}> 
                        <Text style={styles.textc}>
                            暂无群聊
                        </Text>
                    </View>
                
                ):(
                    <View style={styles.groupAll}> 
                        <Text style={styles.groupling}>
                            2个群聊
                        </Text>
                        <View style={styles.items}>
                            <View style={[styles.itemsUpstar,styles.borderBottom]}>
                                <Image style={styles.itemsinmg} source={{uri:"http://192.168.31.14:82//Uploads//Picture//DefaultHead//header.png"}} />
                                <Text style={styles.groupName}>
                                    2个群聊
                                </Text>
                            </View>
                            
                        </View>
                        <View style={styles.items}>
                            <View style={styles.itemsUpstar}>
                                <Image style={styles.itemsinmg} source={{uri:"http://192.168.31.14:82//Uploads//Picture//DefaultHead//header.png"}} />
                                <Text style={styles.groupName}>
                                    2个群聊
                                </Text>
                            </View>
                            
                        </View>
                        <Text style={styles.bottomTY}>
                            2个群聊
                        </Text>
                    </View>
                
                )}
                
                
            </View>
					
        );
    }
}

const styles = StyleSheet.create({
    center:{
        width: pxToDp(640),
        height:40,
        justifyContent: 'center',

    },
    textc:{
        alignSelf:'center',
    },
    groupling:{
        padding:10
    },
    groupAll:{
        
    },
    items:{
        height: 60,
        width: pxToDp(640),
        paddingLeft:10,
        paddingRight:10,
        backgroundColor:'#fff',
    },
    itemsUpstar:{
        flex:1,
        flexDirection:'row',
        alignItems:'center',
        
    },
    borderBottom:{
        borderBottomWidth:1,
        borderColor:'rgb(240,240,240)'
    },
    itemsinmg:{
        width:50,
        height:50,
    },
    groupName:{
        marginLeft:10,
    },
    bottomTY:{
        alignSelf: 'center',
        fontSize:15,
        padding:10,
    }

});